package com.cwc.menu.mapper;

import com.cwc.menu.entity.Role;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author wxhntmy
 */
@Repository
public interface RoleMapper {

    @Select("select * from role where role=#{role}")
    Role getRoleByRoleName(String role);

    @Select("select * from role where id=#{id}")
    Role getRoleByRoleId(String id);

    @Select("select * from role")
    List<Role> getAllRoles();
}
